home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / toadMethods.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.0 KB  |  74 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. #include <math.h>
  22. #include "gl.h"
  23. #include "device.h"
  24. #include "geom.h"
  25. #include "class.h"
  26. #include "classIds.h"
  27. #include "selectors.h"
  28. #include "mbox.h"
  29. #include "individual.h"
  30. #include "behavior.h"
  31. #include "doers.h"
  32. #include "colors.h"
  33. #include "objIds.h"
  34.  
  35. #include "toad.h"
  36.  
  37. #define PI 3.14159265358979323844
  38. #define DEG(x) ((float)x*(float)180/PI)
  39. #define RAD(x) ((float)x*PI/(float)180)
  40.  
  41. extern char frozen;
  42. extern char bullet;
  43.  
  44.  
  45. /* ARGSUSED */
  46. toadinit(s, argtype, univol)
  47.     register individual *s;
  48.     int argtype;
  49.     point *univol;
  50. {
  51. #if 1
  52.     /* this function is not fleshed out yet, might never be */
  53.     return;
  54. #else
  55.     register model *myModel;
  56.  
  57.     replicateModel(s);    /* first, instantiate and initialize the model */
  58.     myModel = s->descr;    /* use newly instantiated model */
  59.  
  60.     makeobj(myModel);
  61.     pushLongName(s);
  62.     backface(FALSE);
  63.     fishWritemask(BACKGROUND);
  64.     fishColor(myModel->color);
  65.  
  66.     backface(TRUE);
  67.     popLongName();
  68.     closeobj();
  69.     myModel->compiled = TRUE;
  70.     myModel->component = (Object)myModel;
  71. #endif
  72. }
  73.  
  74.